<div class="students index">
<h2><?php __('Students');?></h2>
<!-- Table Navigation -->
<div class="tablenav">
    <div class="batchactions"></div>
    <?php echo $this->element('pager'); ?>
</div>
<!-- Table Content Area -->
<table class="table fixed">
    <thead title="<?php __('Click a column to sort data table'); ?>">
        <tr>
            <th  width="3%" class="checkbox" title="<?php __('Click to select/deselect all records'); ?>"><input type="checkbox" class="checkbox"/></th>
            <th><?php echo $paginator->sort('id');?></th>
            <th><?php echo $paginator->sort('number');?></th>
            <th><?php echo $paginator->sort('name');?></th>
            <th><?php echo $paginator->sort('gender');?></th>
            <th><?php echo $paginator->sort('birthday');?></th>
            <th><?php echo $paginator->sort('political');?></th>
            <th><?php echo $paginator->sort('student_minority_id');?></th>
            <th><?php echo $paginator->sort('student_province_id');?></th>
            <th><?php echo $paginator->sort('class');?></th>
            <th><?php echo $paginator->sort('academic');?></th>
            <th><?php echo $paginator->sort('degree');?></th>
            <th><?php echo $paginator->sort('email');?></th>
            <th><?php echo $paginator->sort('phone');?></th>
            <th><?php echo $paginator->sort('students_job_count');?></th>
            <th><?php echo $paginator->sort('created');?></th>
            <th><?php echo $paginator->sort('modified');?></th>
            <th><?php echo $paginator->sort('active');?></th>
            <th class="actions"><?php __('Actions');?></th>
        </tr>
    </thead>
    <tfoot title="<?php __('Click a column to sort data table'); ?>">
        <tr>
            <th class="checkbox" title="<?php __('Click to select/deselect all records'); ?>"><input type="checkbox" class="checkbox"/></th>
            <th><?php echo $paginator->sort('id');?></th>
            <th><?php echo $paginator->sort('number');?></th>
            <th><?php echo $paginator->sort('name');?></th>
            <th><?php echo $paginator->sort('gender');?></th>
            <th><?php echo $paginator->sort('birthday');?></th>
            <th><?php echo $paginator->sort('political');?></th>
            <th><?php echo $paginator->sort('student_minority_id');?></th>
            <th><?php echo $paginator->sort('student_province_id');?></th>
            <th><?php echo $paginator->sort('class');?></th>
            <th><?php echo $paginator->sort('academic');?></th>
            <th><?php echo $paginator->sort('degree');?></th>
            <th><?php echo $paginator->sort('email');?></th>
            <th><?php echo $paginator->sort('phone');?></th>
            <th><?php echo $paginator->sort('students_job_count');?></th>
            <th><?php echo $paginator->sort('created');?></th>
            <th><?php echo $paginator->sort('modified');?></th>
            <th><?php echo $paginator->sort('active');?></th>
            <th class="actions"><?php __('Actions');?></th>
        </tr>
    </tfoot>
    <tbody>
        <?php foreach ($students as $i=>$student):
            $class = $i++ % 2 == 0 ? ' class="altrow"' : ''; ?>
        <tr<?php echo $class;?>>
            <td class="checkbox"><input type="checkbox" class="checkbox"/></td>
            <td><?php echo $student['Student']['id']; ?></td>
            <td><?php echo $student['Student']['number']; ?></td>
            <td><?php echo $student['Student']['name']; ?></td>
            <td><?php echo $student['Student']['gender']; ?></td>
            <td><?php echo $student['Student']['birthday']; ?></td>
            <td><?php echo $student['Student']['political']; ?></td>
            <td><?php echo $student['Student']['student_minority_id']; ?></td>
            <td><?php echo $student['Student']['student_province_id']; ?></td>
            <td><?php echo $student['Student']['class']; ?></td>
            <td><?php echo $student['Student']['academic']; ?></td>
            <td><?php echo $student['Student']['degree']; ?></td>
            <td><?php echo $student['Student']['email']; ?></td>
            <td><?php echo $student['Student']['phone']; ?></td>
            <td><?php echo $student['Student']['students_job_count']; ?></td>
            <td><?php echo $student['Student']['created']; ?></td>
            <td><?php echo $student['Student']['modified']; ?></td>
            <td><?php echo $student['Student']['active']; ?></td>
            <td class="actions">
                <?php echo $html->link(__('View', true), array('action' => 'view', $student['Student']['id'])); ?>
                <?php if($user['group'] != 'student'): ?>
                    <?php echo $html->link(__('Edit', true), array('action' => 'edit', $student['Student']['id'])); ?>
                    <?php echo $html->link(__('Delete', true), array('action' => 'delete', $student['Student']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $student['Student']['id'])); ?>
                <?php endif; ?>
            </td>
        </tr>
        <?php endforeach; ?>
    <tbody>
</table>
</div>
<div class="actions">
    <ul>
        <li><?php echo $html->link(__('New Student', true), array('action' => 'add')); ?></li>
    </ul>
</div>
